package com.time.auth.infra.basic.service.impl;

import com.time.auth.infra.basic.entity.AuthRolePermission;
import com.time.auth.infra.basic.mapper.AuthRolePermissionDao;
import com.time.auth.infra.basic.service.AuthRolePermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 角色权限服务实现类
 *
 * @author: HuangQi
 * @date: Created in 11:28 2025/9/25
 * @description: 角色权限服务实现类
 */
@Service("authRolePermissionService")
public class AuthRolePermissionServiceImpl implements AuthRolePermissionService {

    @Autowired
    private AuthRolePermissionDao authRolePermissionDao;

    @Override
    public List<Long> queryByRoleIdList(List<Long> roleIdList) {
        return this.authRolePermissionDao.queryByRoleIdList(roleIdList);
    }

    @Override
    public Integer batchInsert(List<AuthRolePermission> rolePermissionList) {
        return this.authRolePermissionDao.insertBatch(rolePermissionList);
    }

    @Override
    public List<AuthRolePermission> queryByCondition(AuthRolePermission authRolePermission) {
        return this.authRolePermissionDao.queryAllByLimit(authRolePermission);
    }

    @Override
    public Integer update(AuthRolePermission authRolePermission) {
        return this.authRolePermissionDao.update(authRolePermission);
    }

    @Override
    public Integer updateByPermissionId(AuthRolePermission authRolePermission) {
        return this.authRolePermissionDao.updateByPermissionId(authRolePermission);
    }

    @Override
    public Integer updateByRoleId(AuthRolePermission authRolePermission) {
        return this.authRolePermissionDao.updateByRoleId(authRolePermission);
    }
}
